package com.etooling.germa.entity;

import com.etooling.framework.svo.AbstractEntity;
import com.etooling.framework.entity.ImportDataBatch;
import lombok.Data;

import javax.persistence.*;

@Data
@Entity
@Table(name = "t_import_bom_details", schema = "import_data")
public class ImportBomDetails extends AbstractEntity {
	ImportDataBatch importDataBatch;
	String goodsSpecsId;// 产品规格id
	Integer level;// 零件级别
	@Column(name = "seq")
	Integer seq;// 排
	String materialGoodsName;// 型号名称
	String materialGoodsCode;// 型号编码
	String materialSpecsName;// 规格名称
	String materialSpecsCode;// 规格编码
	String unit;// 单位
	Double unitNum;// 单位数量
	String materialTag;// 产品角色：外购件or自制件
	String memo;// 备注信息
	String status;// 状态
	String resultMemo;//错误信息

	@ManyToOne(targetEntity = ImportDataBatch.class, fetch = FetchType.EAGER)
	@JoinColumn(name = "imp_data_bach_id")
	public ImportDataBatch getImportDataBatch() {
		return importDataBatch;
	}

	public void setImportDataBatch(ImportDataBatch importDataBatch) {
		this.importDataBatch = importDataBatch;
	}

	@Column(length = 4000)
	public String getResultMemo() {
		return resultMemo;
	}
}
